package com.sgb.kjwl.view.widget;

import android.content.Context;
import android.widget.TextView;

import com.sgb.kjwl.R;
import com.swgk.core.dialog.BasePopWindow;
import com.swgk.core.dialog.PopViewHolder;

public class GoodsAddWindow extends BasePopWindow<String> {
    private TextView tvCancel;
    private TextView tv_pic,tv_video;

    public GoodsAddWindow(Context context) {
        super(context, DIR_DOWN_UP);
    }

    @Override
    protected int popLayout() {
        return R.layout.goods_add_bottom;
    }

    @Override
    protected void initView(PopViewHolder holder) {
        tvCancel = holder.getPop().findViewById(R.id.tv_cancel);
        tv_pic = holder.getPop().findViewById(R.id.tv_pic);
        tv_video = holder.getPop().findViewById(R.id.tv_video);
        tv_pic.setOnClickListener(v -> {
            onResultClick.result(1, null, null);
            dismiss();
        });
        tv_video.setOnClickListener(v -> {
            onResultClick.result(2, null, null);
            dismiss();
        });
        tvCancel.setOnClickListener(v -> {
            dismiss();
        });
    }


}
